#ifndef GANGSTER_H_INCLUDED
#define GANGSTER_H_INCLUDED

#include "Mob.h"

#include <QColor>
#include <stdlib.h>
#include <iostream>
#include <fstream>

using namespace std;

class Field;

class Gangster : public Mob
{
    public:
        static const char GANGSTERCHAR = 'g';

        static const int BASECRITCHANCE = 25;
        static const int BASEPLAYERCRITCHANCE = 20;

        Gangster( int x_ = -1, int y_ = -1, Field* f_ = 0, bool status = true,
                  Team team_ = TEAMENUM, Controller* control = 0,
                  int MS = rand() % 2 + 1, int L = rand() % 3 + 1,
                  bool alerted = false, bool isPlayer = false,
                  bool timedLife = false, int timeTillDeath = 1,
                  int shifts_ = 0, int lastUpdate_ = 0, int xp = 0,
                  int sightRange_ = 75, int level = 1 ) :
        Mob(x_, y_, f_,status, team_, control, MS, L, alerted,
             isPlayer, timedLife, timeTillDeath, shifts_,
             lastUpdate_, xp, sightRange_, level)
        {}

          // is called every time gangster updates
        void update( int updateNumber );

        void save( ofstream* save, ofstream* config );

          // there is a chance for critical hit on a mob,
          // it is less for higher leveled mobs and player
        void damage( int value );
          // levels this guy up by one level
        void levelUp();
          // kills gangster
        void kill();
          // shoots a bullet
        void attack( Direction d );

        char getSymbol() const{ return GANGSTERCHAR; }
    protected:
    private:
};


#endif // GANGSTER_H_INCLUDED
